package com.xinxing.learning.datasource.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xinxing.learning.datasource.model.DynamicDataSourceModel;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface DatasourceMapper extends BaseMapper<DynamicDataSourceModel> {

    @Select("select * from oa_quick_knife_datasource " +
            "where datasource_name = #{dbKey} " +
            "and is_show_type = 1 " +
            "and deleted_flag = 0")
    DynamicDataSourceModel getDynamicDbSourceByCode(@Param("dbKey") String dbKey);
}
